/*
 * @LastEditTime: 2023-02-20 16:26:49
 */

import Mongoose from "mongoose";
``
const url = "mongodb://162.14.104.16:27017";

const dbName = "music";

Mongoose.connect(`${url}/${dbName}`, {
    authSource: "admin",
    user: 'root',
    pass: "123456789"
});

const db = Mongoose.connection;

db.on("error", (error) => console.log(error));

db.on("open", () => console.log("MOngodb连接成功！"));

export { Mongoose };